<template>
    <div>
        <h2>ShoppingCar</h2>
        <div class="item-box">
            <div class="items" v-for="(item,index) in $store.state.shopingList" >
                {{index+1}} {{item.title}}{{item.cid}}
                <img class="imgs" :src=item.src alt=item.title>
                x{{item.car_num}}
                <button class="jian" @click="bind(index)">-</button>
            </div>
        </div>
        <div><button @click="clearcar">结账</button></div>
    </div>
</template>
<script src="./shopping.js" />
<style src='./shopping.css'>